<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ page contentType="text/html; charset=UTF-8" import="user.*"%> 
<%@ page import="java.sql.*"%> 

<HEAD><TITLE>Customer Page</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
</HEAD>

<BODY leftMargin="0" topMargin="10">
<table align="center">
	<tr><div align="center"><A href="index.jsp"><IMG height="118" src="Pics/restaurantLogo.JPG" width="242" border="0"></A></div></tr>
    <tr>
    	<table cellSpacing="0" cellPadding="0" width="100%" border="0" align="center">
			<TR>
    			<TD vAlign="top" height="60">
        			<table cellSpacing="1" cellPadding="3" width="60%" align="center" bgColor="#cccccc" border="0">
						<tr bgColor="#bbbbbb"><td align ="center" colspan="7">Order Form</td></tr>
						<tr><td>Form Number</td><td>Order Time</td><td>Order Status</td><td>Price</td></tr>
						<% 
							Object UserTypeObject = session.getAttribute("uType");
			
							//if the current user is a customer
							if (UserTypeObject != null && UserTypeObject.toString().equals("1")) {
								Object usernameObject = session.getAttribute("username");			
								String CusID = LoginValidation.getUserId(usernameObject.toString());
						%>
						<%= DisplayOrderForm.displayOrderFormListForCustomer(CusID) %>
						<%} %>
                    </table>		
          			<table cellSpacing="1" cellPadding="3" width="60%" align="center" bgColor="#eeeeee" border="0">
      					<%
      						String CheckOrderForm = request.getParameter("CheckOrderForm");
      						if (CheckOrderForm != null && CheckOrderForm.length() > 0) {
      					%>
      					<%=DisplayOrderForm.CheckOrderFormDetails(CheckOrderForm) %>
      					<%	}      	
      						String CancelOrderForm = request.getParameter("CancelOrderForm");
      	
      						if (CancelOrderForm != null && CancelOrderForm.length() > 0) {
      					%>
      					<%=DisplayOrderForm.CancelOrderForm(CancelOrderForm) %>
	    				<%	} %>  	
					</table>
    			</TD>
      		</TR>    
      </table> 
    </tr>
    
    <tr><td><table width = 60% align = "center">
	<%=DisplayFoodPage.DisplayMostPopularFood() %>
	</table>
	</td></tr>
</table>
 
</BODY>
